/*
	QUBE
	Sandra Obermann - QPT 1 - 2012
	fhs33730 - 1110601021
	FH Salzburg - Studiengang MultiMediaTechnolgy
*/

#ifndef LEVEL_H_INCLUDED
#define LEVEL_H_INCLUDED

// Cinder Includes
#include "cinder/app/AppBasic.h"

// Own written Includes
#include "../include/BLOCK.h"

// STL Includes
#include <vector>

// Define Grid size with default value 5
#define GRID_SIZE (5)

// Enum for Level layers beginning by 0 as the basic level
// e.g. QUBE start position is at E_LEVEL_2, one level above the basic level
enum LEVEL_LAYER
{
	E_LEVEL_1 = 0,
	E_LEVEL_2 = GRID_SIZE*1,
	E_LEVEL_3 = GRID_SIZE*2,
	E_LEVEL_4 = GRID_SIZE*3,
	E_LEVEL_5 = GRID_SIZE*4
};

// My Level Class
class Level
{
public:

	// Default Level Constructor/Destructor
	Level();
	virtual ~Level();

	// Level design
	void	buildLevel();
	void	buildLevel(int width,int height, int depth);
	void	killLevel();
	void	drawLevel();

	// Create 3D Vector Array which contains BLOCKS
	std::vector< std::vector< std::vector< BLOCK* > > >		m_blocks;
	
	// Returns if there is a BLOCK in the 3D Vector Array on position xyz or not
	BLOCK* getLevelBlock( int x, int y, int z );

	// Returns the finish Location
	ci::Vec3f getFinishPosition();

private:

	// Add BLOCKS into the 3D Vector Array with position and color ( default color is light gray )
	void AddLevelBlock( int x, int y, int z, ci::ColorA newBlockColor = ci::ColorA(0.90f, 0.90f, 0.90f, 1.0f) );
	
	// Level Properties
	int			m_levelWidth;
	int			m_levelHeight;
	int			m_levelDepth;
	ci::Vec3f	m_finishPosition;
};

#endif // LEVEL_H_INCLUDED